//
//  YDUserInfo.swift
//  YDReadFish
//
//  Created by rowena on 2019/3/31.
//  Copyright © 2019年 wuyezhiguhun. All rights reserved.
//

import UIKit

class YDUserInfo: NSObject, NSCoding {
    var userName: String?
    var userPassword: String?
    
    
    
    override func setValuesForKeys(_ keyedValues: [String : Any]) {
        
    }
    
    override init() {
        super.init()
    }
    
    // MARK: ==== 解档 ====
    required init?(coder aDecoder: NSCoder) {
        super.init()
        userName = aDecoder.decodeObject(forKey: "userName") as! String?
        userPassword = aDecoder.decodeObject(forKey: "userPassword") as! String?
    }
    
    // MARK: ==== 归档 ====
    func encode(with aCoder: NSCoder) {
        aCoder.encode(userName, forKey: "userName")
        aCoder.encode(userPassword, forKey: "userPassword")
    }
}
